package com.shawn.jetpackstady.paging.bean;

import androidx.annotation.NonNull;
import androidx.lifecycle.MutableLiveData;
import androidx.paging.DataSource;

import com.shawn.jetpackstady.paging.ConcertDataSource;

/**
 * 数据源工厂
 */
public class ConcertFactory extends DataSource.Factory<Integer,Concert> {
    private MutableLiveData<ConcertDataSource> mutableLiveData =
            new MutableLiveData<>();
    @NonNull
    @Override
    public DataSource<Integer, Concert> create() {
        ConcertDataSource concertDataSource = new ConcertDataSource();
        mutableLiveData.postValue(concertDataSource);
        return concertDataSource;
    }
}
